<template>
	<view class="parent-view">
		<view class="dialog-view">
			<text class="title-view">设置权限</text>
			<view class="item-view" @click="itemClick" data-index="3">
				<image class="select-icon":src="index==3?'../../static/fan_png_ic_radio_checked.png':'../../static/fan_png_ic_radio_unchecked.png'"></image>
				<text class="select-txt" :style="index==3?'color: #FF4206;':'color: #B8B8B8;'">联合发起人</text>
			</view>
			<view class="item-view" @click="itemClick" data-index="1">
				<image class="select-icon"  :src="index==1?'../../static/fan_png_ic_radio_checked.png':'../../static/fan_png_ic_radio_unchecked.png'"></image>
				<text class="select-txt" :style="index==1?'color: #FF4206;':'color: #B8B8B8;'">管理员</text>
			</view>
			<view class="item-view" @click="itemClick" data-index="0">
				<image class="select-icon" :src="index==0?'../../static/fan_png_ic_radio_checked.png':'../../static/fan_png_ic_radio_unchecked.png'"></image>
				<text class="select-txt" :style="index==0?'color: #FF4206;':'color: #B8B8B8;'">家谱成员</text>
			</view>
			<view class="item-view" @click="itemClick" data-index="4">
				<image class="select-icon" :src="index==4?'../../static/fan_png_ic_radio_checked.png':'../../static/fan_png_ic_radio_unchecked.png'"></image>
				<text class="select-txt" :style="index==4?'color: #FF4206;':'color: #B8B8B8;'">仅查看</text>
			</view>
			<view class="item-view" @click="itemClick" data-index="5">
				<image class="select-icon" :src="index==5?'../../static/fan_png_ic_radio_checked.png':'../../static/fan_png_ic_radio_unchecked.png'"></image>
				<text class="select-txt":style="index==5?'color: #FF4206;':'color: #B8B8B8;'">移除家谱</text>
			</view>
			<view class="btn-view">
				<text class="btn-left" @click="leftClick">取消</text>
				<text class="btn-right" @click="rightClick">确定</text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
		name: "set-permissions-pop",
		data() {
			return {
				index:-1
			}
		},
		methods: {
			///点击用户
			itemClick(event) {
				let item = event.currentTarget.dataset.index;
				this.index=parseInt(item)
			},
			leftClick(){
				var data={
					isClose:true,
					index:-1,
				}
				this.$emit('returnQuanXian',data)
			},
			rightClick(){
				this.$emit('returnQuanXian',{
					isClose:true,
					index:this.index,
				})
			}
		}
	}
</script>

<style>
	@import "set-permissions-pop.css";
</style>
